#include <iostream>

using namespace std;

int main(){
    int array[3][4] = {{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}};
    for(int (*p)[4] = array; p != array + 3; ++p){
        for(int *q = *p; q != *p + 4; ++q){
            cout << *q << " ";
        }
        cout << endl;
    }
    return 0;
}